<route>
    {
        meta: {
            layout: 'index',
            title:'订单详细',
            keepAlive:false
        }
    }  
  </route>
<template>
    <view>
       
        <a-row :gutter="8">
            <a-col :span="8">
                <view v-if="orderData">
                    <OrderProcess :order="orderData"></OrderProcess>
                </view>  
            </a-col>
            <a-col :span="8">
                <OrderCustomPay :order="orderData"></OrderCustomPay>
            </a-col>
            <a-col :span="8">
                <PayLog :order="orderData"></PayLog>
            </a-col>
        </a-row>
    </view>
</template>

<script setup>
import emitter from '@/utils/mitt';
import OrderCustomPay from '@/custom/pms/pages/order/components/OrderCustomPay.vue';
import PayLog from '@/custom/pms/pages/order/components/PayLog.vue';
import OrderProcess from '@/custom/pms/pages/order/components/OrderProcess.vue';
import { queryOne } from '@/custom/pms/api/order';
import useApp from '@/hooks';
import useUserStore from '@/store/modules/user';
const userStore = useUserStore();
const { $, proxy } = useApp();
const route = useRoute();
const orderData = ref(null);
// 获取订单信息
function queryOrder() {
    queryOne(route.params.id).then(res => {
        console.log(res)
        orderData.value = res;
    })

}
queryOrder();
emitter.on('do-update',e=>{
    if(e == orderData.value.id){
        queryOrder();
    }
})
</script>